<!DOCTYPE html>
<html lang="zh-CN" class="nivo-lightbox-notouch" xmlns:th="http://www.thymeleaf.org">
<head>
    <title>写文章啦 | 小虚无的下午茶</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <link rel="stylesheet" th:href="@{/static/css/bootstrap.min.css}">
    <link rel="stylesheet" th:href="@{/static/css/font-awesome.min.css}">
    <link rel="stylesheet" th:href="@{/static/css/slicknav.css}">
    <link rel="stylesheet" th:href="@{/static/css/nivo-lightbox.css}">
    <link rel="stylesheet" th:href="@{/static/css/animate.css}">
    <link rel="stylesheet" th:href="@{/static/css/main.css}">
    <link rel="stylesheet" th:href="@{/static/css/responsive.css}">
    <link rel="stylesheet" th:href="@{/static/editor.md/css/editormd.min.css}">
    <link rel="stylesheet" th:href="@{/static/editor.md/css/editormd.preview.min.css}">
</head>
<body>
<header th:replace="header_home.html"></header>

<div style="padding-top:80px; ">
    <div>
        <p>文章题目：</p>
        <input id="article-title" type="text">
    </div>
    <div id="editor">
        <textarea style="display: none" id="article-text">请输入文章内容...</textarea>
    </div>
    <div class="btn-container">
        <button class="btn btn-info" onclick="addArticle()">提交</button>
    </div>
    <div id="markdown-view">
        <textarea style="display: none" th:text="${articleMain}"></textarea>
    </div>
</div>
<div class="message-box-warp">
    <div id="message-box" class="message-box">
        <p id="message-box-text"></p>
    </div>
</div>
<!-- 底部开始 -->
<footer th:replace="footer.html"></footer>
<!-- 底部结束 -->
<script type="text/javascript" th:src="@{/static/js/jquery-min.js}"></script>
<script type="text/javascript">
    $(function() {
        var editor = editormd("editor", {
            width: "100%",
            height: 500,
            saveHTMLToTextarea: true,
            syncScrolling : "single",
            path : "/static/editor.md/lib/",
            imageUpload: true,
            imageFormats : ["jpg", "jpeg", "gif", "png", "bmp", "webp"],
            toolbarIcons : function() {
                return editormd.toolbarModes["full"]
            },
        });
    });
</script>
<script type="text/javascript">
    $(function() {
        var testView = editormd.markdownToHTML("markdown-view", {
            // markdown : "[TOC]\n### Hello world!\n## Heading 2", // Also, you can dynamic set Markdown text
            htmlDecode : true,  // Enable / disable HTML tag encode.
            // htmlDecode : "style,script,iframe",  // Note: If enabled, you should filter some dangerous HTML tags for website security.
        });
    });
</script>
<script type="text/javascript" th:src="@{/static/editor.md/editormd.min.js}"></script>
<script type="text/javascript" th:src="@{/static/editor.md/lib/marked.min.js}"></script>
<script type="text/javascript" th:src="@{/static/editor.md/lib/prettify.min.js}"></script>
<script type="text/javascript" th:src="@{/static/editor.md/lib/raphael.min.js}"></script>
<script type="text/javascript" th:src="@{/static/editor.md/lib/underscore.min.js}"></script>
<script type="text/javascript" th:src="@{/static/editor.md/lib/sequence-diagram.min.js}"></script>
<script type="text/javascript" th:src="@{/static/editor.md/lib/flowchart.min.js}"></script>
<script type="text/javascript" th:src="@{/static/editor.md/lib/jquery.flowchart.min.js}"></script>
<script type="text/javascript" th:src="@{/static/js/popper.min.js}"></script>
<script type="text/javascript" th:src="@{/static/js/bootstrap.min.js}"></script>
<script type="text/javascript" th:src="@{/static/js/jquery.mixitup.js}"></script>
<script type="text/javascript" th:src="@{/static/js/jquery.counterup.min.js}"></script>
<script type="text/javascript" th:src="@{/static/js/waypoints.min.js}"></script>
<script type="text/javascript" th:src="@{/static/js/wow.js}"></script>
<script type="text/javascript" th:src="@{/static/js/jquery.nav.js}"></script>
<script type="text/javascript" th:src="@{/static/js/jquery.easing.min.js}"></script>
<script type="text/javascript" th:src="@{/static/js/nivo-lightbox.js}"></script>
<script type="text/javascript" th:src="@{/static/js/jquery.slicknav.js}"></script>
<script type="text/javascript" th:src="@{/static/js/main.js}"></script>
</body>
</html>